﻿<Window x:Class="Mengsk.ERP.App.AddressCheck.DownloadingWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="订单下载" Height="300" MinWidth="400" Loaded="Window_Loaded" Closing="Window_Closing"  WindowStartupLocation="CenterScreen" SizeToContent="WidthAndHeight">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <ListBox Grid.Row="0" Margin="3" Name="lstOrderManagers">
            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ListBoxItem">
                                <GroupBox Margin="3">
                                    <GroupBox.Header>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding OrderManager.Shop}" Margin="3"/>
                                        </StackPanel>
                                    </GroupBox.Header>
                                    
                                    <Grid >
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <TextBlock Grid.Row="0" Text="{Binding Message}" Margin="3" VerticalAlignment="Center"/>
                                        <ProgressBar Grid.Row="1" Value="{Binding Progress}" Margin="3" Maximum="1" Minimum="0" Height="23"/>
                                    </Grid>
                                </GroupBox>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>
        
        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="3" HorizontalAlignment="Right">
            <Button Name="btnCancel" Content="取消" Margin="3" Click="btnCancel_Click" Width="60"/>
            <Button Name="btnStart" Content="开始" Margin="3" Click="btnStart_Click" Width="60"/>
        </StackPanel>
        
    </Grid>
</Window>
